<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>recipes</title>
</head>
<body>
<h3>处方列表</h3>
<form action="">
    <input type="text" name="id">
    <input type="submit" value="搜索">
    <a href="{% url 'text:recipe_add' %}">新增</a>

</form>
<table border="1">
    <tr>
        <td>序号</td>
        <td>处方名称</td>
        <td>诊断结果</td>
        <td>诊断医生</td>
        <td>患者</td>
        <td colspan="3" style="text-align: center">操作</td>
    </tr>
    {% for i in rec %}
        <tr>
        <td>{{ i.id }}</td>
        <td>{{ i.cname }}</td>
        <td>{{ i.result }}</td>
        <td>{{ i.doctor_id }}</td>
        <td>{{ i.hname }}</td>
        <td><a href="{% url 'text:recipe_update' i.id %}">修改</a></td>
        <td><a href="{% url 'text:recipe_del' %}">删除</a></td>
    {% endfor %}
    </tr>

</table>
<a href="{% url 'text:recipes' %}?id={{ id }}&page={{ page|add:-1 }}">上一页</a>
<a href="">当前页:{{ page }}</a>
<a href="{% url 'text:recipes' %}?id={{ id }}&page={{ page|add:+1 }}">下一页</a>

</body>
</html>